﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BCL.BaseLib;
using BCL.BaseLib.Basics;
namespace WpfControlTool.Logic
{
    public class Login : ICustom
    {
        public bool FunctionInvoke(FunctionEntity fe)
        {
            Windows.WindowLogin2 windowLogin = new Windows.WindowLogin2();
            bool? islogin = windowLogin.ShowDialog();
            return islogin != null && (bool)islogin;
        }
    }

    public class My : ICustom
    {
        public bool FunctionInvoke(FunctionEntity fe)
        {
            Windows.WindowMy windowLogin = new Windows.WindowMy();
            bool? islogin = windowLogin.ShowDialog();
            return islogin != null && (bool)islogin;
        }
    }

    public class AboutUs : ICustom
    {
        public bool FunctionInvoke(FunctionEntity fe)
        {
            Windows.WindowAboutUs windowLogin = new Windows.WindowAboutUs();
            bool? islogin = windowLogin.ShowDialog();
            return islogin != null && (bool)islogin;
        }
    }

    public class TopControl : ICustom
    {
        public bool FunctionInvoke(FunctionEntity fe)
        {
            BCLApplication.MainForm.TopControl = new Windows.UCTopControl();
            return true;
        }
    }
}
